
<%@ page import="projectmanager.Requirement" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'requirement.label', default: 'Requirement')}" />
		<title><g:message code="Requirement Details" /></title>
	</head>
	<body>
		<a href="#show-requirement" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div id="container">
		<g:render template="/layouts/sidebar"/>
		<div id="content">
		<div id="show-requirement" class="content scaffold-show" role="main">
			<h1><g:message code="Requirement Details" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list requirement">
			
				<g:if test="${requirementInstance?.name}">
				<li class="fieldcontain">
					<span id="name-label" class="property-label"><g:message code="requirement.name.label" default="Name" /></span>
					
						<span class="property-value" aria-labelledby="name-label"><g:fieldValue bean="${requirementInstance}" field="name"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${requirementInstance?.description}">
				<li class="fieldcontain">
					<span id="description-label" class="property-label"><g:message code="requirement.description.label" default="Description" /></span>
					
						<span class="property-value" aria-labelledby="description-label"><g:fieldValue bean="${requirementInstance}" field="description"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${requirementInstance?.type}">
				<li class="fieldcontain">
					<span id="type-label" class="property-label"><g:message code="requirement.type.label" default="Type" /></span>
					
						<span class="property-value" aria-labelledby="type-label"><g:fieldValue bean="${requirementInstance}" field="type"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${requirementInstance?.project}">
				<li class="fieldcontain">
					<span id="project-label" class="property-label"><g:message code="requirement.project.label" default="Project" /></span>
					
						<span class="property-value" aria-labelledby="project-label"><g:link controller="project" action="show" id="${requirementInstance?.project?.id}">${requirementInstance?.project?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				<g:if test="${requirementInstance?.functionalPoints}">
				<li class="fieldcontain">
					<span id="functionalPoints-label" class="property-label"><g:message code="requirement.functionalPoints.label" default="Functional Points" /></span>
					
						<span class="property-value" aria-labelledby="functionalPoints-label"><g:fieldValue bean="${requirementInstance}" field="functionalPoints"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${requirementInstance?.tasks}">
				<li class="fieldcontain">
					<span id="tasks-label" class="property-label"><g:message code="requirement.tasks.label" default="Tasks" /></span>
					
						<g:each in="${requirementInstance.tasks}" var="t">
						<span class="property-value" aria-labelledby="tasks-label"><g:link controller="task" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
			</ol>
			</div></div>
				<div id=footer></div>
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${requirementInstance?.id}" />
					<g:link class="edit" action="edit" id="${requirementInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
